package com.pzhu.acargid.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.multipart.MultipartResolver;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;

@Configuration
public class SpringConfig {
/*    @Bean
    public CommonsMultipartResolver commonsMultipartResolver() {
        CommonsMultipartResolver commonsMultipartResolver = new CommonsMultipartResolver();
        commonsMultipartResolver.setMaxUploadSize(Long.MAX_VALUE);
        return commonsMultipartResolver;
    }*/

    @Bean
    public MultipartResolver multipartResolver() {
//        MultipartResolver multipartResolver = new StandardServletMultipartResolver();
        MultipartResolver multipartResolver = new CommonsMultipartResolver();
//        multipartResolver.setResolveLazily(true);
        return multipartResolver;
    }

}
